(function(t) {
    function a() {
        return $page.name == "cart"
    }
    function e() {
        return $page.name == "addsucess"
    }
    function n() {
        return $page.name == "shopping"
    }
    function r() {
        return $page.name == "order-success"
    }
    function o() {
        return $page.name == "allowance"
    }
    if (a())
        $("#head-title").html("购物车").css("color", "#333");
    if (n())
        $("#head-title").html("订单信息").css("color", "#333");
    if (r())
        $("#gome-head").hide();
    var i = stageJsServer + "/??/gmlib/unit/bigdata/1.0.0/bigdata.js,gmlib/unit/scode/1.0.0/scode.js,gmlib/unit/scodecommon/1.0.0/scodecommon.js";
    var c = util.cond([[a, u], [n, p], [r, m], [o, l], [e, d]]);
    c(null);
    function u() {
        util_watch.watchOnce($page.name, "renderEnd", function(t) {
            asyncLoadCSSJS.loadJS(i, function(a) {
                $("[maima_param").live("click", function() {
                    recTrack($(this).attr("maima_param"))
                });
                var e = [];
                $("[bigdata-pid]").each(function() {
                    e.push(";" + this.getAttribute("bigdata-pid"))
                });
                var n = {};
                n.home = "普通";
                n.groupOn = "团购";
                n.rushBuy = "抢购";
                n.secondHand = "淘实惠";
                n.warranty = "延保";
                n.presell = "预售";
                var r = n[$page.site];
                s.pageName = "购物流程:" + r + "流程:购物车";
                s.channel = "购物流程";
                s.prop1 = "购物流程:" + r + "流程";
                s.prop2 = "购物流程:" + r + "流程:购物车";
                s.prop3 = "购物流程:" + r + "流程:购物车";
                s.prop4 = "购物流程:" + r + "";
                s.events = "scView";
                s.products = e.join(",");
                var o = s.t();
                if (o) {
                    document.write(o)
                }
                if (cartApp.isCartEmpty(t))
                    return;
                if (cartApp.isWarrantySite())
                    return;
                var i = util;
                var c = i.pipe(i.prop("commerceItemsGroups"), i.map(i.prop("commerceItemsGroup")));
                var u = i.map(c, t.data.siVOs);
                var p = i.flatten(u);
                function m(t) {
                    return $config.renderText(t, "id@{productId}_price@{salePrice}_num@{quantity}")
                }
                gomeClicki("send", "event", "购物车页面", "购物车产品", "产品信息", {customActionId: 55, customActionLabel1: i.map(m, p).join(","), customActionValue1: 1, nonInteraction: 1})
            })
        })
    }
    function p() {
        util_watch.watchOnce(listOfItem.TYPE, "renderEnd", function(t) {
            if ($page.site == "haiwaigou") {
                window.s_account = "gome-prd,gome-higo-prd"
            }
            asyncLoadCSSJS.loadJS(i, function() {
                var a = listOfItem.filterAllItems(util.T, t);
                var e = {haiwaigou: "海外购", home: "普通", groupOn: "团购", rushBuy: "抢购", secondHand: "淘实惠", warranty: "延保", presell: "预售", gomeEntityCard: "普通"}[$page.site];
                function n(a) {
                    var n = "";
                    var r = "";
                    var o = "";
                    var i = "普通";
                    if (a.warrantyItem)
                        n = a.warrantyItem.price;
                    var c = listOfItem.isGome(a, t);
                    if (c)
                        r = "gome";
                    else
                        r = "coo8";
                    if (!c) {
                        var s = listOfItem.getShopByItem(a, t);
                        o = s.shopId
                    }
                    i = e;
                    return[";", a.pid, ";;;event13=", n, ";eVar23=", r, "|eVar24=", o, "|eVar29=", i].join("")
                }
                function r() {
                    return $page.site == "gomeVirtualCard"
                }
                function o(t) {
                    return[";", t.pid, ";;;event13=", "", ";eVar23=", "gome", "|eVar24=", "", "|eVar29=", "普通"].join("")
                }
                var i = util.map(util.ifn(r, o, n), a);
                e = e || "普通";
                s.pageName = "购物流程:" + e + "流程:填写订单";
                s.channel = "购物流程";
                s.prop1 = "购物流程:" + e + "流程";
                s.prop2 = "购物流程:" + e + "流程:填写订单";
                s.prop3 = "购物流程:" + e + "流程:填写订单";
                s.prop4 = "购物流程:" + e + "";
                if ($page.site == "gomeEntityCard") {
                    s.prop4 = "购物流程:" + e + ":实体卡"
                }
                if ($page.site == "gomeVirtualCard") {
                    s.prop4 = "购物流程:" + e + ":电子卡"
                }
                s.events = "scCheckout";
                s.products = i.join(",");
                var c = s.t();
                if (c) {
                    document.write(c)
                }
            })
        })
    }
    function m() {
        util_watch.watchOnce($page.name, "renderEnd", function(a) {
            asyncLoadCSSJS.loadJS(i, function() {
                t(a)
            })
        });
        function t(t) {
            s.pageName = "购物流程:" + t.trackData.siteName + "流程:订单成功页";
            s.channel = "购物流程";
            s.prop1 = "购物流程:" + t.trackData.siteName + "流程";
            s.prop2 = "购物流程:" + t.trackData.siteName + "流程:订单成功页";
            s.prop3 = "购物流程:" + t.trackData.siteName + "流程:订单成功页";
            s.prop4 = "购物流程:" + t.trackData.siteName;
            s.events = "purchase";
            s.products = t.trackData.products;
            s.eVar11 = t.trackData.eVar11;
            s.transactionID = t.trackData.transactionID;
            s.purchaseID = t.trackData.purchaseID;
            s.eVar5 = t.eVar5;
            s.eVar6 = t.eVar6;
            var a = s.t();
            if (a)
                document.write(a);
            gomeClicki("send", "event", "订单", "订单监测", t.trackData.purchaseID, {customActionId: 52, customActionLabel1: t.trackData.purchaseID, customActionLabel2: t.payAmount, customActionLabel3: t.trackData.siteName, customActionValue1: "1"});
            var e = t.trackData.products.split(",");
            function n(t) {
                var a = t.split(";");
                return $config.renderText({productId: a[1], salePrice: a[3], quantity: a[2]}, "id@{productId}_price@{salePrice}_num@{quantity}")
            }
            gomeClicki("send", "event", "订单", "订单产品", t.trackData.purchaseID, {customActionId: 54, customActionLabel1: t.trackData.purchaseID, customActionLabel2: util.map(n, e), customActionValue1: "1"})
        }}
    function l() {
        util_watch.watchOnce($page.name, "renderEnd", function(a) {
            asyncLoadCSSJS.loadJS(i, function() {
                t(a)
            })
        });
        function t(t) {
            s.pageName = "购物流程:节能补贴身份认证信息填写页";
            s.channel = "购物流程";
            s.prop1 = "购物流程:节能补贴身份认证信息填写页";
            s.prop2 = "购物流程:节能补贴身份认证信息填写页";
            s.prop3 = "购物流程:节能补贴";
            s.prop4 = "购物流程:普通";
            var a = s.t();
            if (a)
                document.write(a)
        }}
    function d() {
        asyncLoadCSSJS.loadJS(i, function() {
            t()
        });
        function t() {
            s.pageName = "购物流程:加入购物车成功页";
            s.channel = "购物流程";
            s.prop1 = "购物流程:加入购物车成功页";
            s.prop2 = "购物流程:加入购物车成功页";
            s.prop3 = "购物流程:加入购物车成功页";
            s.prop4 = "购物流程:" + (window.location.href.indexOf("haiwaigou") != -1) ? "海外购商品" : "普通";
            var t = s.t();
            if (t)
                document.write(t);
            $("[maima_param").live("click", function() {
                recTrack($(this).attr("maima_param"))
            })
        }}
    var f = function() {
    };
    var g = ["font-size:2em"];
    var h = [["color:#CC0066"], ["color:#CC9966"], ["color:#FF99FF"], ["color:#006600"], ["color:#0099CC"], ["color:#330066"], ["color:#333300"], ["color:#336633"], ["color:#999900"]];
    var v = util.map(util.concat(g), h);
    if (window.console && window.console.log.apply) {
        function w(t, a) {
            if (t == 0)
                return[];
            var e = t % a.length;
            return util.concat([a[e]], w(t - 1, a))
        }
        f = function(t, a) {
            a.sort(function(t, a) {
                return Math.random() > .5
            });
            var e = w(t.length, util.map(function(t) {
                return t.join(";")
            }, a));
            console.log.apply(console, ["%c" + t.split("").join("%c")].concat(e))
        };
        f("gome-cart-front-0-2-2", v);
        f("..........", h);
        Object.defineProperty(t, "招聘前端", {set: function(t) {
            }, get: function() {
                return y()
            }})
    }
    function y() {
        try {
            var t = '	    	<div style="padding-top:33px;">		    	<a 		    	target="_blank" 		    	href="http://wpa.qq.com/msgrd?v=3&uin=262666212&site=qq&menu=yes">		    		<img 		    		border="0" 		    		src="http://wpa.qq.com/pa?p=2:262666212:51" 		    		alt="招聘前端" 		    		title="点击这里给我发消息"/>		    	</a>		    </div>	    	';
            return $("#head-box").html(t).find("img")
        } catch (a) {
        }
    }
    function I() {
        $("body").on("DOMNodeInserted", function(t) {
            if ($(t.target).is(".mmz_float_curve"))
                $(t.target).remove()
        })
    }
    t.others = {dlog: f, info: y, nomarlFont: h, bigFont: v}
})(this);